from numpy import random
import numpy as np

x = random.randint(100)#0-100之间的随机整数
print(x)
x = random.rand()#0-1之间的随机浮点数
print(x)
x=random.randint(100, size=(5))# 1D决定于size的tuple设置，5个随机0-100的随机整数
print(x)
x = random.randint(100, size=(3, 5)) #2D
print(x)
#float 随机数，少个max设置
x = random.rand(5)
print(x)
x = random.rand(3, 5)
print(x)
#choice，随机选取，当然可以用index也行，底层差不多吧
x = random.choice([3, 5, 7, 9])
print(x)
x = random.choice([3, 5, 7, 9], size=(3, 5))
print(x)
#Permutation
arr = np.array([1, 2, 3, 4, 5])
random.shuffle(arr)
print(arr)
arr = np.array([1, 2, 3, 4, 5])
print(random.permutation(arr))

import seaborn as sns
import matplotlib.pyplot as plt
sns.histplot([0, 1, 2, 3, 4, 5])
plt.show()
sns.kdeplot([0, 1, 2, 3, 4, 5], fill=False)
plt.show()